
import pygame
from Base import Base
from random import *

class Apply(Base):

    def __init__(self,img,bg_size):

        Base.__init__(self,img,[],bg_size)

        self.reset()

        self.speed = 5

    def move(self):
        
        if self.rect.top > self.bgH:
            self.actived = False
        else:
            self.rect.top += self.speed
    
    def reset(self):

        self.actived=True

        self.rect.left,self.rect.top = randint(0,self.bgW-self.rect.width),randint(0,50)

class BulletApply(Apply):

    def __init__(self,bg_size):

        Apply.__init__(self,"bullet_supply",bg_size)

class BombApply(Apply):
    
    def __init__(self,bg_size):

        Apply.__init__(self,"bomb_supply",bg_size)

